<?php

use app\models\User;
use yii\helpers\Html;
use yii\helpers\Url;

/**
 * @var yii\web\View $this
 * @var string $content
 * @var User $user
 */

$this->title = '矿大FM';

?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <base href="/">
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>

    <!--    引入字体图表需要的css-->
    <link rel="stylesheet" href="/font-awesome-4.2.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/css/index.css">
    <link rel="stylesheet" type="text/css" href="/css/user.css">

</head>
<body>
<?php $this->beginBody() ?>
<div class="index container-fluid">
    <div class="title-wrap">
        <div class="col-xs-2 back">
            <a href="javascript:history.back();">
                <i class="fa fa-arrow-left" aria-hidden="true"></i>
            </a>
        </div>
        <div class="col-xs-8 main-title"><span><?=$user->user_name?></span></div>
        <div class="col-xs-2 config">
            <a href="<?=Url::to(['/user/info'])?>">
                <i class="fa fa-cogs" aria-hidden="true"></i>
            </a>
        </div>

    </div>
    <div class="content">
        <div class="user-wrap">
            <div class="user-info clearfix">
                <div class="img-wrap"><img src="<?= $user->avatar ?>-avatar" class="img-responsive" alt="#"></div>
<!--                <div class="id-wrap"><span>"天涯共此时"</span></div>-->
                <div class="edit-info-wrap"><a href="<?=Url::to(['/user/info'])?>">"<?=$user->signature?>"</a></div>
            </div>
        </div>
        <div class="part-info"><span class="col-xs-12">收藏的内容</span></div>
        <div class="collect-wrap card-list">
        <?php foreach($user->collectAudios as $audio) { ?>
            <div class="card container">
                <div class="col-xs-12 img">
                    <a href="<?=Url::to(['/audio', 'id'=>$audio->id])?>">
                        <img src="<?=$audio->audio_pic?>-audio" alt="">
                    </a>
                    <!--    TODO 这里需要加上超链接，标题也要 -->
                </div>
                <h2 class="col-xs-8">
                    <a href="<?=Url::to(['/audio', 'id'=>$audio->id])?>"><?=$audio->title?></a>
                </h2>
                <div class="col-xs-4 favorite">
                    <i class="fa fa-heart" aria-hidden="true"></i>
                    <span><?=$audio->praise_num?></span>
                </div>
                <p class="col-xs-12 desc">
                    <?=$audio->description?>
                    <?php foreach ($audio->labels as $label) { ?>
                        #<?=$label->name?>#
                    <?php } ?>
                </p>
                <a class="col-xs-12 more" href="<?=Url::to(['/audio', 'id'=>$audio->id])?>">查看详情 &gt;</a>
            </div>
        <?php } ?>
        </div>
    </div>
</div>


<?php //$this->endBody() ?>
<script src="js/lib/jquery/jquery.min.js"></script>
<script src="js/lib/bootstrap/bootstrap.min.js"></script>
<div style="display: none;"><script src="http://s11.cnzz.com/z_stat.php?id=1261300538&web_id=1261300538" language="JavaScript"></script></div>
</body>
</html>
<?php $this->endPage() ?>
